//
//  UILabel+LXAdd.h
//  LXLabelDemo
//
//  Created by 刘鑫 on 16/4/13.
//  Copyright © 2016年 liuxin. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UILabel (LXAdd)
/**
 *  字间距
 */
@property (nonatomic,assign)CGFloat characterSpace;

/**
 *  行间距
 */
@property (nonatomic,assign)CGFloat lineSpace;

/**
 *  关键字
 */
@property (nonatomic,copy)NSString *keywords;
@property (nonatomic,strong)UIFont *keywordsFont;
@property (nonatomic,strong)UIColor *keywordsColor;

/**
 *  删除线
 */
@property (nonatomic,copy)NSString *deletelineStr;
@property (nonatomic,strong)UIColor *deletelineColor;
/**
 *  下划线
 */
@property (nonatomic,copy)NSString *underlineStr;
@property (nonatomic,strong)UIColor *underlineColor;

@property (nonatomic, readonly) CGFloat lineHeight;
@property (nonatomic, readonly) NSInteger textNumberOfLines;
@property (nonatomic, readonly) CGFloat textHeight;
@property (nonatomic, readonly) CGFloat textWidth;

- (CGSize)textSizeForLimitedSize:(CGSize)size;

- (NSMutableAttributedString *)attributedStringWith:(NSString *)string lineSpace:(CGFloat)lineSpace limitWidth:(CGFloat)limitWidth;

/**
 *  计算label宽高，必须调用
 *
 *  @param maxWidth 最大宽度
 *
 *  @return label的size
 */
- (CGSize)getLableSizeWithMaxWidth:(CGFloat)maxWidth;

- (void) textLeftTopAlign;

@end
